<?php

namespace App\Vilidate\delivery;

/**
 * user控制器下的验证规则类
 */
class DataSpreadController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];
    public $batchSettings = ['rule'=>[], 'msg'=>[]];
    public $promotionLink = ['rule'=>[], 'msg'=>[]];

    public $accountBind = ['rule'=>[], 'msg'=>[]];


    public $copy = ['rule'=>[], 'msg'=>[]];

    public $monitoringLink = ['rule'=>[
        'backhaul_setting_id' => 'required|integer',
    ],
        'msg'=>[
            'backhaul_setting_id.required' => '回传监测配置不能为空',
            'backhaul_setting_id.integer' => '回传监测配置应为整数',
        ]
    ];

    public $create = [
        'rule'=>[
            'name' => 'required',
//            'company_id' => 'required|integer',
            'applet_id' => 'required|integer',
            'playlet_id' => 'required|integer',
            'spread_platform_id' => 'required|integer',
            'playlet_number' => 'required|integer',
            'playlet_number_num' => 'required|integer',
            'playlet_number_num_pay' => 'required|integer',
            'recharge_template_type' => 'required|integer',

        ],
        'msg'=>[
            'name.required' => '名字不能为空',
//            'company_id.required' => '公司不能为空',
            'applet_id.required' => '小程序不能为空',
            'playlet_id.required' => '短剧不能为空',
            'spread_platform_id.required' => '投放平台不能为空',
            'playlet_number.required' => '集数不能为空',
            'playlet_number_num.required' => '付费集数不能为空',
            'playlet_number_num_pay.required' => '单集价格不能为空',
            'recharge_template_type.required' => '模板类型不能为空',
//            'company_id.integer' => '公司ID应为整数',
            'applet_id.integer' => '小程序ID应为整数',
            'playlet_id.integer' => '短剧ID应为整数',
            'spread_platform_id.integer' => '投放平台ID应为整数',
            'playlet_number.integer' => '集数应为整数',
            'playlet_number_num.integer' => '付费集数应为整数',
            'playlet_number_num_pay.integer' => '单集价格应为整数',
            'recharge_template_type.integer' => '模板类型应为整数',
        ]
    ];

    public $update = [
        'rule'=>[
            'name' => 'required',
//            'company_id' => 'required|integer',
            'applet_id' => 'required|integer',
            'playlet_id' => 'required|integer',
            'spread_platform_id' => 'required|integer',
            'playlet_number' => 'required|integer',
            'playlet_number_num' => 'required|integer',
            'playlet_number_num_pay' => 'required|integer',
            'recharge_template_type' => 'required|integer',
        ],
        'msg'=>[
            'name.required' => '名字不能为空',
            'applet_id.required' => '小程序不能为空',
//            'company_id.required' => '公司不能为空',
            'playlet_id.required' => '短剧不能为空',
            'spread_platform_id.required' => '投放平台不能为空',
            'playlet_number.required' => '集数不能为空',
            'playlet_number_num.required' => '付费集数不能为空',
            'playlet_number_num_pay.required' => '单集价格不能为空',
            'recharge_template_type.required' => '模板类型不能为空',
//            'company_id.integer' => '公司ID应为整数',
            'applet_id.integer' => '小程序ID应为整数',
            'playlet_id.integer' => '短剧ID应为整数',
            'spread_platform_id.integer' => '投放平台ID应为整数',
            'playlet_number.integer' => '集数应为整数',
            'playlet_number_num.integer' => '付费集数应为整数',
            'playlet_number_num_pay.integer' => '单集价格应为整数',
            'recharge_template_type.integer' => '模板类型应为整数',
        ]
    ];
}